package com.atguigu.gmall.activity.client;

import com.atguigu.gmall.activity.client.impl.ActivityDegradeFeignClient;
import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.activity.SeckillGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * @Author atguigu-mqx
 * @Description TODO
 * @Date 2023/5/31 9:28
 * @Version 1.0
 */
@FeignClient(value = "service-activity",fallback = ActivityDegradeFeignClient.class)
public interface ActivityFeignClient {

    /**
     * 查询所有秒杀商品
     * @return
     */
    @GetMapping("/api/activity/seckill/findAll")
    public Result findAll();

    /**
     * 根据skuId 查询当前秒杀商品详情
     * @param skuId
     * @return
     */
    @GetMapping("/api/activity/seckill/getSeckillGoods/{skuId}")
    public Result getSeckillGoods(@PathVariable Long skuId);

    /**
     * 订单结算页
     * @return
     */
    @GetMapping("/api/activity/seckill/auth/trade")
    Result<Map> trade();


}
